import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/login',
    component: () => import('@/views/login')
  },
  {
    path: '/changeUser',
    component: () => import('@/views/changeUser')
  },
  {
    path: '/',
    component: () => import('@/layout'),
    children: [
      { path: '/', rediract: '/my' },
      { path: '/home', name: 'home', component: () => import('@/layout/home') },
      { path: '/my', name: 'my', component: () => import('@/layout/my') },
      { path: '/qa', name: 'qa', component: () => import('@/layout/qa') },
      { path: '/video', name: 'video', component: () => import('@/layout/video') }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
